package com.ruoyi.Warehouse.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.Warehouse.mapper.CardinventoryMapper;
import com.ruoyi.Warehouse.domain.Cardinventory;
import com.ruoyi.Warehouse.service.ICardinventoryService;
import com.ruoyi.common.core.text.Convert;

/**
 * 卡牌库存表Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-16
 */
@Service
public class CardinventoryServiceImpl implements ICardinventoryService 
{
    @Autowired
    private CardinventoryMapper cardinventoryMapper;

    /**
     * 查询卡牌库存表
     * 
     * @param inventoryId 卡牌库存表主键
     * @return 卡牌库存表
     */
    @Override
    public Cardinventory selectCardinventoryByInventoryId(Long inventoryId)
    {
        return cardinventoryMapper.selectCardinventoryByInventoryId(inventoryId);
    }

    /**
     * 查询卡牌库存表列表
     * 
     * @param cardinventory 卡牌库存表
     * @return 卡牌库存表
     */
    @Override
    public List<Cardinventory> selectCardinventoryList(Cardinventory cardinventory)
    {
        return cardinventoryMapper.selectCardinventoryList(cardinventory);
    }

    /**
     * 新增卡牌库存表
     * 
     * @param cardinventory 卡牌库存表
     * @return 结果
     */
    @Override
    public int insertCardinventory(Cardinventory cardinventory)
    {
        return cardinventoryMapper.insertCardinventory(cardinventory);
    }

    /**
     * 修改卡牌库存表
     * 
     * @param cardinventory 卡牌库存表
     * @return 结果
     */
    @Override
    public int updateCardinventory(Cardinventory cardinventory)
    {
        return cardinventoryMapper.updateCardinventory(cardinventory);
    }

    /**
     * 批量删除卡牌库存表
     * 
     * @param inventoryIds 需要删除的卡牌库存表主键
     * @return 结果
     */
    @Override
    public int deleteCardinventoryByInventoryIds(String inventoryIds)
    {
        return cardinventoryMapper.deleteCardinventoryByInventoryIds(Convert.toStrArray(inventoryIds));
    }

    /**
     * 删除卡牌库存表信息
     * 
     * @param inventoryId 卡牌库存表主键
     * @return 结果
     */
    @Override
    public int deleteCardinventoryByInventoryId(Long inventoryId)
    {
        return cardinventoryMapper.deleteCardinventoryByInventoryId(inventoryId);
    }
}
